<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2021/3/6
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>信息</title>
</head>
<body>
    <table align="center" border="1px">
        <caption>欢迎您，刘启明大哥！</caption>
        <%--<c:if test="${not empty requestScope.msg}">
            <tr>
                <td colspan="8" align="left">
                    <font color="red">${requestScope.msg}</font>
                </td>
            </tr>
        </c:if>--%>
        <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>密码</th>
            <th>性别</th>
            <th>年龄</th>
            <th>邮箱</th>
            <th>是否管理员</th>
            <th>操作</th>
        </tr>
        <c:forEach var="user" items="${sessionScope.userList}">
            <tr>
                <td>${user.id}</td>
                <td>${user.username}</td>
                <td>${user.password}</td>
                <td>${user.gender=='M'?'男':'女'}</td>
                <td>${user.age}</td>
                <td>${user.email}</td>
                <td>${user.admin?'是':'否'}</td>
                <td>
                    <a href="info?id=${user.id}">修改</a>
                    <a href="deleteUser?id=${user.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="8" align="right">
                <a href="registerForm">用户注册</a>
            </td>
        </tr>
    </table>
</body>
</html>
